package cc.zy.base.hr.mapper;

import cc.zy.base.hr.entity.StaffSyncLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author ljy
 * @time 2022/03/09 21:03:03
 */
@Repository
public interface StaffSyncLogMapper extends BaseMapper<StaffSyncLog> {
    /**
     * 查找同步日志详细信息
     *
     * @param page    分页对象
     * @param staffSyncLog 用户对象，用于传递查询条件
     * @return Ipage
     */
    <T> IPage<StaffSyncLog> getStaffSyncLogDetailPage(Page<T> page, @Param("staffSyncLog") StaffSyncLog staffSyncLog);

    /**
     * 统计同步日志的总数
     * @param staffSyncLog
     * @return
     */
    long countStaffSyncLogDetail(@Param("staff") StaffSyncLog staffSyncLog);

    /**
     * 新建同步日志
     * @param staffSyncLog
     */
    void createStaffSyncLog(@Param("staffSyncLog") StaffSyncLog staffSyncLog);

    /**
     * 通过ID查找同步日志
     * @param logId
     * @return
     */
    StaffSyncLog getStaffSyncLogById(Integer logId);


}
